package com.example.demo.all.config;

import com.example.demo.all.enums.AiModel;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.openai.OpenAiChatModel;
import org.springframework.ai.zhipuai.ZhiPuAiChatModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zwg
 * @date 2025/2/20 22:25
 */
@Configuration
public class ChatClientConfig {



    @Bean(name = "openAiChatClient")
    public ChatClient getOpenAiChatClient(OpenAiChatModel openAiChatModel){
        return ChatClient.create(openAiChatModel);
    }

    @Bean(name = "zhiPuAiChatClient")
    public ChatClient getZhiPuAiChatClient(ZhiPuAiChatModel zhiPuAiChatModel) {
        return ChatClient.create(zhiPuAiChatModel);
    }
}
